package com.king.pattem.proxy.statics;

import com.king.pattem.proxy.service.UserService;
import com.king.pattem.proxy.service.impl.UserServiceImpl;

public class Main {
    public static void main (String [] args) {
        IDBQuery q = new DBQueryProxy(); // 使用代理
        System.out.println(q.request()); // 在真正使用时才创建对象

        UserService userService = new UserServiceImplProxy(new UserServiceImpl());
        userService.addUser("001", "centre");
    }
}